package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;
import org.jsola.core.validator.Const;
import org.jsola.hr.constant.EducationLevelEnum;

import java.util.Date;
import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.EmpEducationExample.E_COMPANY_ID;
import static org.jsola.hr.example.EmpEducationExample.E_DEGREE_NAME;
import static org.jsola.hr.example.EmpEducationExample.E_DEGREE_NUMBER;
import static org.jsola.hr.example.EmpEducationExample.E_DEGREE_TYPE;
import static org.jsola.hr.example.EmpEducationExample.E_EDUCATION;
import static org.jsola.hr.example.EmpEducationExample.E_EDUCATION_REMARK;
import static org.jsola.hr.example.EmpEducationExample.E_EMP_ID;
import static org.jsola.hr.example.EmpEducationExample.E_END_TIME;
import static org.jsola.hr.example.EmpEducationExample.E_GRA_CER_NUMBER;
import static org.jsola.hr.example.EmpEducationExample.E_GRA_COLLEGE;
import static org.jsola.hr.example.EmpEducationExample.E_IS_FIRST_DEGREE;
import static org.jsola.hr.example.EmpEducationExample.E_IS_FIRST_EDU;
import static org.jsola.hr.example.EmpEducationExample.E_IS_HIGHEST_DEGREE;
import static org.jsola.hr.example.EmpEducationExample.E_IS_HIGHEST_EDU;
import static org.jsola.hr.example.EmpEducationExample.E_IS_LEHRAMT;
import static org.jsola.hr.example.EmpEducationExample.E_MAJOR;
import static org.jsola.hr.example.EmpEducationExample.E_START_TIME;
import static org.jsola.hr.example.EmpEducationExample.E_TEA_METHODS;
import static org.jsola.hr.example.EmpEducationExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.EmpEducationExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.EmpEducationExample.M_DEGREE_NAME_MAX;
import static org.jsola.hr.example.EmpEducationExample.M_DEGREE_NUMBER_MAX;
import static org.jsola.hr.example.EmpEducationExample.M_EDUCATION_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpEducationExample.M_EDUCATION_REMARK_MAX;
import static org.jsola.hr.example.EmpEducationExample.M_EMP_ID_MAX;
import static org.jsola.hr.example.EmpEducationExample.M_GRA_CER_NUMBER_MAX;
import static org.jsola.hr.example.EmpEducationExample.M_GRA_COLLEGE_MAX;
import static org.jsola.hr.example.EmpEducationExample.M_MAJOR_MAX;
import static org.jsola.hr.example.EmpEducationExample.M_TEA_METHODS_MAX;
import static org.jsola.hr.example.EmpEducationExample.N_COMPANY_ID;
import static org.jsola.hr.example.EmpEducationExample.N_DEGREE_NAME;
import static org.jsola.hr.example.EmpEducationExample.N_DEGREE_NUMBER;
import static org.jsola.hr.example.EmpEducationExample.N_DEGREE_TYPE;
import static org.jsola.hr.example.EmpEducationExample.N_EDUCATION;
import static org.jsola.hr.example.EmpEducationExample.N_EDUCATION_REMARK;
import static org.jsola.hr.example.EmpEducationExample.N_EMP_ID;
import static org.jsola.hr.example.EmpEducationExample.N_END_TIME;
import static org.jsola.hr.example.EmpEducationExample.N_GRA_CER_NUMBER;
import static org.jsola.hr.example.EmpEducationExample.N_GRA_COLLEGE;
import static org.jsola.hr.example.EmpEducationExample.N_IS_FIRST_DEGREE;
import static org.jsola.hr.example.EmpEducationExample.N_IS_FIRST_EDU;
import static org.jsola.hr.example.EmpEducationExample.N_IS_HIGHEST_DEGREE;
import static org.jsola.hr.example.EmpEducationExample.N_IS_HIGHEST_EDU;
import static org.jsola.hr.example.EmpEducationExample.N_IS_LEHRAMT;
import static org.jsola.hr.example.EmpEducationExample.N_MAJOR;
import static org.jsola.hr.example.EmpEducationExample.N_START_TIME;
import static org.jsola.hr.example.EmpEducationExample.N_TEA_METHODS;

/**
 * 员工教育经历
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【员工教育经历】的参数")
@Data
public class EmpEducationUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private String id;

    @ApiModelProperty(notes = N_EMP_ID, example = E_EMP_ID)
    @Length(max = 32, message = M_EMP_ID_MAX)
    private String empId;

    @ApiModelProperty(notes = N_GRA_COLLEGE, example = E_GRA_COLLEGE)
    @Length(max = 255, message = M_GRA_COLLEGE_MAX)
    private String graCollege;

    @ApiModelProperty(notes = N_GRA_CER_NUMBER, example = E_GRA_CER_NUMBER)
    @Length(max = 255, message = M_GRA_CER_NUMBER_MAX)
    private String graCerNumber;

    @ApiModelProperty(notes = N_IS_LEHRAMT, example = E_IS_LEHRAMT)
    private Boolean isLehramt;

    @ApiModelProperty(notes = N_MAJOR, example = E_MAJOR)
    @Length(max = 255, message = M_MAJOR_MAX)
    private String major;

    @ApiModelProperty(notes = N_EDUCATION, example = E_EDUCATION, allowableValues = EducationLevelEnum.VALUES_STR)
    @Const(constClass = EducationLevelEnum.class, message = M_EDUCATION_ENUM_NOT_MATCH)
    private Integer education;

    @ApiModelProperty(notes = N_TEA_METHODS, example = E_TEA_METHODS)
    @Length(max = 50, message = M_TEA_METHODS_MAX)
    private String teaMethods;

    @ApiModelProperty(notes = N_START_TIME, example = E_START_TIME)
    private Date startTime;

    @ApiModelProperty(notes = N_END_TIME, example = E_END_TIME)
    private Date endTime;

    @ApiModelProperty(notes = N_IS_FIRST_EDU, example = E_IS_FIRST_EDU)
    private Boolean isFirstEdu;

    @ApiModelProperty(notes = N_IS_HIGHEST_EDU, example = E_IS_HIGHEST_EDU)
    private Boolean isHighestEdu;

    @ApiModelProperty(notes = N_DEGREE_TYPE, example = E_DEGREE_TYPE)
    private Integer degreeType;

    @ApiModelProperty(notes = N_DEGREE_NAME, example = E_DEGREE_NAME)
    @Length(max = 100, message = M_DEGREE_NAME_MAX)
    private String degreeName;

    @ApiModelProperty(notes = N_DEGREE_NUMBER, example = E_DEGREE_NUMBER)
    @Length(max = 255, message = M_DEGREE_NUMBER_MAX)
    private String degreeNumber;

    @ApiModelProperty(notes = N_EDUCATION_REMARK, example = E_EDUCATION_REMARK)
    @Length(max = 2147483647, message = M_EDUCATION_REMARK_MAX)
    private String educationRemark;

    @ApiModelProperty(notes = N_IS_FIRST_DEGREE, example = E_IS_FIRST_DEGREE)
    private Boolean isFirstDegree;

    @ApiModelProperty(notes = N_IS_HIGHEST_DEGREE, example = E_IS_HIGHEST_DEGREE)
    private Boolean isHighestDegree;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;


}

